package com.cbh.feign.controller.product;



import java.util.List;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.cbh.api.model.ApiResult;
import com.cbh.api.model.product.Product;


public interface ProductControllerBase {

	/**
	 * 保存产品信息
	 * 
	 * @param product
	 * @return
	 */
	@RequestMapping(value = "/sign/v3/products", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> save(@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestBody(required = true) Product ob);

	/**
	 * 获取全部产品信息
	 * 
	 * @return
	 */
	@RequestMapping(value = "/sign/v3/products", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<List<Product>> getAll(@RequestParam(value = "accountToken", required = true) String accountToken);

	/**
	 * 获取产品信息
	 * 
	 * @param proId
	 * @return
	 */
	@RequestMapping(value = "/sign/v3/products/id", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<Product> getOne(@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "id", required = true) String id);
}
